﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using FixSoft.CloudGround.Base;
using System.Diagnostics;
using System.Text.RegularExpressions;

namespace FixSoft.CloudGround
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
    

        private void WindowSourceInitialized(object sender, EventArgs e)
        {
            System.Windows.Forms.Application.EnableVisualStyles();
           // this.Visibility = System.Windows.Visibility.Collapsed; 
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            App.PictureManager.client.Stop();
            if (App.PictureManager .CurrentPicture != null && File.Exists ( App.Path + "\\Cache\\" + App.PictureManager.CurrentPicture.Id + ".jpg"))
            File.Delete(App.Path + "\\Cache\\" + App.PictureManager.CurrentPicture.Id + ".jpg");
        }

    }
}
